#include <bits/stdc++.h>
using namespace std;
multiset <int>se;
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	int n,ans=0;cin>>n;
	for(int i=1;i<=n;i++){
		int x;cin>>x;
		se.insert(x);
	}
	while(1){
		int now=se.size();
		auto it=se.begin();
		auto s=se.upper_bound(*it);
		while(s!=se.end() ){
			se.erase(it);
			ans++;it=s;
			s=se.upper_bound(*it);
		}
		if(se.size()== now) break;
		se.erase(it);
	}
	cout<<n-ans;
	return 0;
}
